package com.youlai.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.youlai.system.common.model.Option;
import com.youlai.system.model.entity.SysLocation;
import com.youlai.system.model.form.LocationForm;
import com.youlai.system.model.query.LocationPageQuery;
import com.youlai.system.model.vo.LocationPageVO;

import java.util.List;

/**
 * 培训地点业务接口
 */
public interface SysLocationService extends IService<SysLocation> {

    /**
     * 根据培训地点查询对象
     *
     * @param content
     * @return
     */
    SysLocation getByContentEqual(String content);

    /**
     * 根据培训地点保存对象
     *
     * @param content
     * @return
     */
    SysLocation saveByContent(String content);


    /**
     * 培训地点分页列表
     *
     * @param queryParams
     * @return
     */
    Page<LocationPageVO> getLocationPage(LocationPageQuery queryParams);

    /**
     * 保存培训地点
     *
     * @param locationForm
     * @return
     */
    boolean saveLocation(LocationForm locationForm);


    /**
     * 更新培训地点
     *
     * @param locationForm
     * @return
     */
    boolean updateLocation(Long locationId, LocationForm locationForm);

    /**
     * 查询单个培训地点
     *
     * @param locationId
     * @return
     */
    LocationForm getLocationForm(Long locationId);

    /**
     * 删除培训地点列表
     *
     * @param idsStr
     * @return
     */
    boolean deleteLocations(String idsStr);


    /**
     * 删除培训地点列表
     *
     * @param idList
     * @return
     */
    boolean deleteLocations(List<Long> idList);

    /**
     * 培训地点下拉列表
     *
     * @return
     */
    List<Option> listLocationOptions();
}
